package com.example.demo.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.entity.Tag;
import com.example.demo.mapper.Tagmapper;
import com.example.demo.service.Tagservice;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Tagserviceimpl implements Tagservice {
    @Resource
    Tagmapper tagmapper;
    @Override
    public List<Tag> selectq() {
        return tagmapper.selectList(null);
    }

    @Override
    public Page<Tag> selectBy(Page<Tag> page) {
        return tagmapper.selectPage(page,null);
    }

    @Override
    public int insert(Tag tag) {
        return tagmapper.insert(tag);
    }

    @Override
    public Tag selectAka(int id) {
        return tagmapper.selectById(id);
    }

    @Override
    public int update(Tag tag) {
        return tagmapper.updateById(tag);
    }

    @Override
    public int date(int id) {
        return tagmapper.deleteById(id);
    }

    @Override
    public List<Tag> selectTagCount() {
        return tagmapper.selectTagCount();
    }
}
